DROP TABLE IF EXISTS jms_dm.dm_unloading_statistics_sum_dt;
create external table jms_dm.dm_unloading_statistics_sum_dt
(
    unloading_date date COMMENT '拆包日期',
    manage_regional_code string COMMENT '管理大区编码',
    manage_regional_name string COMMENT '管理大区名称',
    agent_code string COMMENT '代理区code',
    agent_name string COMMENT '代理区名称',
    unloading_sitecode string COMMENT '拆包网点编码',
    unloading_sitename string COMMENT '拆包网点名称',
    unloading_package_sum bigint COMMENT '拆包总数',
    cycle_bagging_sum bigint COMMENT '循环袋拆包总数',
    uncycle_bagging_sum bigint COMMENT '非循环袋拆包总数',
    package_num_sum bigint COMMENT '包内件总数',
    cycle_bagging_package_sum bigint COMMENT '循环袋包内件总数'
) comment '拆包统计汇总表'
    PARTITIONED BY (dt string COMMENT '时间分区')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_unloading_statistics_sum_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );
MSCK REPAIR TABLE jms_dm.dm_unloading_statistics_sum_dt;
